<template>
	<view class="route-track-list">
		<web-view :src="`${baseUrl}/fpages/route-track.html`"></web-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				baseUrl: this.C.baseUrl,
				points: [],
				lat: 30.657401,
				lng: 104.065861,
			}
		},
		onShow(){
			const that = this;
		},
		onLoad(){
			this.getRouteTrackDetail();
		},
		methods: {
			// 获取-行程轨迹详情
			getRouteTrackDetail(){
				const that = this, U = that.U, C = that.C;
				
				let luser = uni.getStorageSync(C.luser);
				let ps = {
					uname: luser.userId, 
					stime: that.U.getSEToday()[0], 
					etime: that.U.getSEToday()[1],
				};
				that.$u.api.getMapPointTrackList(ps).then(res => {
					if(res.code == 1){
						let list = res.data;
						
						let pos = [];
						list.forEach(it => {
							pos.push({latitude: it.lat, longitude: it.lng});
						});
						that.points = pos;
					}
				});
			},
		},
		
	}
</script>

<style>
.route-track-list{
	
}
</style>
